#include <54func.h>
int main(int argc, char *argv[])
{
    // 8_myls dir1
    ARGS_CHECK(argc,2);
    DIR * dirp = opendir(argv[1]);
    ERROR_CHECK(dirp,NULL,"opendir");
    struct dirent * pdirent;
    while((pdirent = readdir(dirp)) != NULL){
        printf("inode = %ld, reclen = %d, type = %d, name = %s\n",
               pdirent->d_ino, pdirent->d_reclen,
               pdirent->d_type,pdirent->d_name);
    }
    closedir(dirp);
    return 0;
}

